package com.ultimate.management.entity.vue;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author LH
 * @Date 2024/2/26 17:14
 * @PackageName com.ultimate.management.entity.vue
 * @Description: 为前端动态菜单栏提供实体类
 */
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class RouterVo {
    //路由地址
    private String path;
    private String componet;

    //是否显示
    private boolean alwaysShow;

    //路由名称
    private String name;

    //路由meta信息
    private Meta meta;

    @Data
    @AllArgsConstructor
    public class Meta {
        private String title;//标题
        private String icon; //图标
        private Object[] roles; //角色列表
    }

    //子路由
    private List<RouterVo> children = new ArrayList<>();
}
